import {NgModule} from "@angular/core";
import {BrowserModule} from "@angular/platform-browser";
import {FormsModule} from "@angular/forms";
import {Routes, RouterModule} from "@angular/router";
import {CrisisListComponent} from "./crisis-list.component";
import {HeroListComponent} from "./hero-list.component";
import {AppComponent} from "./app.component";
const appRoutes: Routes = [
    {path: 'crisis-center', component: CrisisListComponent},
    {path: 'heroes', component: HeroListComponent}, {
        path: '',
        redirectTo: '/heroes',
        pathMatch: 'full'
    }
];
@NgModule({
    imports: [BrowserModule,
        FormsModule,
        RouterModule.forRoot(appRoutes)],
    providers: [],
    declarations: [
        AppComponent,
        HeroListComponent,
        CrisisListComponent
    ],
    bootstrap: [AppComponent]
})
export class AppModule {

}